﻿using RpcModel;
using RpcModularModel.Accredit;
using RpcModularModel.Accredit.Model;
using RpcSyncService.Accredit;

namespace RpcSyncService.Interface
{
    public interface IAccreditToken
    {
        AccreditToken Token { get; }
        Guid AccreditId { get; }
        string CheckKey { get; }

        bool Cancel();
        bool CheckRole(MsgSource source);
        void Create(AccreditToken token);
        bool Init(Guid accreditId);

        TimeSpan? Refresh();
        bool Remove(out Guid[] subs);
        bool SetState(string state);

        AccreditDatum Get();
        bool Set(SetAccredit obj);
    }
}